/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bolao.service;


import bolao.dominio.Categoria;
import bolao.dominio.Item;
import java.util.List;
import javax.ejb.Stateless;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author 002824992500
 */
@Stateless
public class ItemService extends CRUDService {
    public List<Categoria> getTodasCategorias() {
        return findAll(Categoria.class);
    }

    private static final Logger log = LoggerFactory.getLogger(ItemService.class);

    public Categoria findCategoriaByID(String strIdCategoria) {        
        Categoria c = new Categoria(new Long(strIdCategoria));        
        return (Categoria) executeQuerySingleResult("select c from Categoria c where c = ?1", c);
    }

    public List<Item> getTodosItens() {
        return findAll(Item.class);
    }

}
